import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PrescriptionsComponent } from './prescriptions.component';
import { PrescriptionsFolderComponent } from './prescriptions-folder/prescriptions-folder.component';
import { OperationRecordComponent } from './operation-record/operation-record.component';
import { PrescriptionsRemarksComponent } from './prescriptions-remarks/prescriptions-remarks.component';
import { PrescriptionsDetailsComponent } from './prescriptions-details/prescriptions-details.component';

const routes: Routes = [
	{
		path: '',
		component: PrescriptionsComponent,
		children: [
			{
				path: '',
				redirectTo: 'prescriptions-folder',
				pathMatch: 'full'
			},
			{
				path: 'prescriptions-folder',
				component: PrescriptionsFolderComponent
			},
			{
				path: 'operation-record',
				component: OperationRecordComponent
			},
			{
				path: 'prescriptions-remarks',
				component: PrescriptionsRemarksComponent
			},
			{
				path: 'prescriptions-details',
				component: PrescriptionsDetailsComponent
			}
			// {
			// 	path: 'filelist',
			// 	loadChildren: 'app/suandao/main/filelist/filelist.module#FilelistModule'
			// },
			// {
			// 	path: '',
			// 	redirectTo: 'worktable',
			// 	pathMatch: 'full'
			// }
			// {
			// 	path: '',
			// 	redirectTo: 'prescriptions',
			// 	pathMatch: 'full'
			// }
		]
	}
];

@NgModule({
	imports: [
		RouterModule.forChild(routes)
	],
	exports: [
		RouterModule
	]
})
export class PrescriptionsRoutingModule {
	constructor() { }
}
